/*
 *  Copyright 2011-2012 Redia A/S
 * 
 *  This file is part of Redias Android Utilities.
 *
 *  Redias Android Utilities is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Redias Android Utilities is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with Redias Android Utilities.  If not, see <http://www.gnu.org/licenses/>.
 */
package dk.redia.lib.xmlrpc.covers;

import android.os.AsyncTask;
import dk.redia.lib.xmlrpc.XmlRpcClientCallTask;
import dk.redia.lib.xmlrpc.XmlRpcClientResultListener;

public class CoversXmlRpcClient {
	public static CoversXmlRpcClient instance;
	
	public static CoversXmlRpcClient getInstance() {
		if (instance==null) {
			instance = new CoversXmlRpcClient();
		}
		return instance;
	}
	
	private CoversXmlRpcClient() {
		
	}
	
	public void getCoverUrlsFromArray(String[] isbnOrFaustIds, XmlRpcClientResultListener resultListener) {
		CoversXmlRpcClientCall c = new CoversXmlRpcClientCall();
		c.resultListener = resultListener;
		c.methodName = "getCoverUrlsFromArray";
		c.params = new Object[] {
				isbnOrFaustIds
		};
		new XmlRpcClientCallTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, c);
	}
	
}
